/* 统计管理页面专用样式 */

/* 页面容器样式 */
.statistics-container {
    padding: 20px;
    background-color: #f5f7fb;
    min-height: 100vh;
}

/* 页面头部样式 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary);
}

/* 页面标题样式 */
.page-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

/* 导出区域样式 */
.export-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.export-section .btn {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 6px;
}

/* 预览表格样式 */
.preview-table {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
}

.preview-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.preview-table th,
.preview-table td {
    padding: 6px 8px;
    border: 1px solid #ddd;
    text-align: left;
}

.preview-table th {
    background-color: #e9ecef;
    font-weight: bold;
}

.preview-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* 模态框样式增强 */
.modal-content {
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px 8px 0 0;
}

.modal-header .close {
    color: white;
    opacity: 0.8;
}

.modal-header .close:hover {
    opacity: 1;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 15px 20px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
    display: block;
}

.form-control {
    border-radius: 4px;
    border: 1px solid #ced4da;
    padding: 8px 12px;
    font-size: 14px;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* 统计卡片容器样式 */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* 统计卡片样式 */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* 统计图标样式 */
.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 24px;
}

.stat-icon.projects {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary);
}

.stat-icon.issues {
    background: rgba(76, 201, 240, 0.1);
    color: var(--success);
}

.stat-icon.progress {
    background: rgba(247, 37, 133, 0.1);
    color: var(--warning);
}

.stat-icon.pending {
    background: rgba(108, 117, 125, 0.1);
    color: var(--gray);
}

/* 统计信息样式 */
.stat-info h3 {
    font-size: 24px;
    margin-bottom: 5px;
    color: var(--dark);
    font-weight: 600;
}

.stat-info p {
    color: var(--gray);
    font-size: 14px;
    margin: 0;
}

/* 图表区域样式 */
.charts-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

/* 图表卡片样式 */
.chart-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    transition: box-shadow 0.3s;
}

.chart-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* 图表头部样式 */
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-header h3 {
    font-size: 18px;
    color: var(--dark);
    font-weight: 600;
    margin: 0;
}

/* 图表容器样式 */
.chart-container {
    height: 300px;
    position: relative;
}

/* 大型统计图表样式 */
.large-chart-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
    transition: box-shadow 0.3s;
}

.large-chart-container:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.large-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.large-chart-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

.large-chart {
    height: 400px;
    position: relative;
}

/* 统计表格样式 */
.stats-table-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
}

.stats-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.stats-table-header h3 {
    font-size: 18px;
    color: var(--dark);
    font-weight: 600;
    margin: 0;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.stats-table th {
    text-align: left;
    padding: 12px 15px;
    border-bottom: 2px solid var(--border);
    color: var(--gray);
    font-weight: 600;
    background-color: #f8f9fa;
}

.stats-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    color: var(--dark);
}

.stats-table tr:last-child td {
    border-bottom: none;
}

.stats-table tr:hover {
    background-color: rgba(67, 97, 238, 0.05);
    transition: background-color 0.2s;
}

/* 加载动画样式 */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.loading-text {
    text-align: center;
    color: var(--gray);
    font-size: 14px;
    margin-top: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 992px) {
    .charts-container {
        grid-template-columns: 1fr;
    }
    
    .large-chart {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .statistics-container {
        padding: 15px;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
        margin-right: 15px;
    }
    
    .stat-info h3 {
        font-size: 20px;
    }
    
    .chart-card,
    .large-chart-container {
        padding: 15px;
    }
    
    .chart-container {
        height: 250px;
    }
    
    .large-chart {
        height: 300px;
    }
    
    .page-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .statistics-container {
        padding: 10px;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        padding: 20px 15px;
    }
    
    .stat-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .chart-header,
    .large-chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .stats-table {
        font-size: 12px;
    }
    
    .stats-table th,
    .stats-table td {
        padding: 8px 10px;
    }
}

/* 打印样式 */
@media print {
    .statistics-container {
        background-color: white !important;
        padding: 0 !important;
    }
    
    .stat-card,
    .chart-card,
    .large-chart-container,
    .stats-table-container {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        page-break-inside: avoid;
    }
    
    .chart-container,
    .large-chart {
        height: 300px !important;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .stat-card,
    .chart-card,
    .large-chart-container,
    .stats-table-container {
        border: 2px solid #000;
    }
    
    .stats-table th {
        border-bottom: 3px solid #000;
    }
    
    .stats-table td {
        border-bottom: 2px solid #000;
    }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    .stat-card,
    .chart-card,
    .large-chart-container {
        transition: none;
    }
    
    .loading-spinner {
        animation: none;
        border: 4px solid #f3f3f3;
    }
    
    .stats-table tr:hover {
        transition: none;
    }
}

/* 报表查看页面样式 */
.report-container {
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.report-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.report-actions {
    display: flex;
    gap: 10px;
}

.report-filter-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 30px;
}

.filter-row {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 280px;
}

.filter-label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
}

/* 筛选区域表单控件样式 */
.report-filter-section .form-control {
    height: 42px;
    padding: 10px 15px;
    font-size: 14px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background-color: #fff;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.report-filter-section .form-control:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
    outline: none;
}

.report-filter-section select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.report-filter-section input[type="date"].form-control {
    min-height: 42px;
}

.report-filter-section .btn {
    height: 42px;
    padding: 0 20px;
    font-size: 14px;
    border-radius: 6px;
    font-weight: 500;
}

.report-content {
    margin-top: 20px;
}

.data-summary {
    background: #e8f4fd;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #1890ff;
}

.summary-item {
    display: inline-block;
    margin-right: 30px;
    font-size: 14px;
}

.summary-value {
    font-weight: 600;
    color: #1890ff;
    font-size: 16px;
}

.data-table-container {
    overflow-x: auto;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    background: #fafafa;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #e8e8e8;
    white-space: nowrap;
}

.data-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}

.data-table tr:hover {
    background: #f5f5f5;
}

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 15px 0;
}

.pagination-info {
    color: #666;
    font-size: 14px;
}

.pagination-controls {
    display: flex;
    gap: 5px;
}

.pagination-btn {
    padding: 6px 12px;
    border: 1px solid #d9d9d9;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.pagination-btn:hover:not(:disabled) {
    border-color: #1890ff;
    color: #1890ff;
}

.pagination-btn:disabled {
    color: #ccc;
    cursor: not-allowed;
}

.pagination-btn.active {
    background: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.no-data {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-data i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #ccc;
}

.export-format-selector {
    display: flex;
    gap: 10px;
    align-items: center;
}

.format-option {
    padding: 8px 16px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    background: #fff;
}

.format-option.active {
    background: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

.format-option:hover {
    border-color: #1890ff;
}